package com.egame.manage.biz.server.op;

import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.List;

import cn.egame.common.exception.ExceptionCommonBase;
import cn.egame.ext.op.AdvDetail;

public class StoreAdvertiseServiceImpl {

	private static StoreAdvertiseServiceImpl instance = null;
	private static byte[] SyncRoot = new byte[1];
	private StoreAdvertiseServiceDao dao = null;
	
	public static StoreAdvertiseServiceImpl getInstance() throws ExceptionCommonBase {
		if (instance == null) {
			synchronized (SyncRoot) {
				if (instance == null) {
					instance = new StoreAdvertiseServiceImpl();
				}
			}
		}
		return instance;
	}
	
	public StoreAdvertiseServiceImpl() throws ExceptionCommonBase{
		super();
		dao = new StoreAdvertiseServiceDao();
	}
	
	public int deleteAdvertisement(int appId, long loginUserId, int activityId)throws ExceptionCommonBase{
		return dao.deleteAdvertisement(activityId);
	}
	
	public int upper(int appId, long loginUserId, int activityId) throws RemoteException {
		return dao.upper(appId, loginUserId, activityId);
	}
	
	public int lower(int appId, long loginUserId, int activityId) throws RemoteException {
		return dao.lower(appId, loginUserId, activityId);
	}
	
	public int getMaxSortNo(int type,int position)throws RemoteException{
		return dao.getMaxSortNo(type, position);
	}
}
